<template>

  <div>
    <!--Tab栏-->
    <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">
      <el-tab-pane label="全部" name='liqiushi'></el-tab-pane>
      <el-tab-pane label="待审核" name=0></el-tab-pane>
      <el-tab-pane label="已审核" name=1></el-tab-pane>
      <el-tab-pane label="已拒绝" name=2></el-tab-pane>
    </el-tabs>

    <!--题库列表-->
    <questions-randoms-list-liqiushi
      :randomsList="randomsList"
    />

  </div>
</template>

<script>
import QuestionsRandomsListLiqiushi from '@/module-hmmm/components/components-liqiushi/questions-randoms-list-liqiushi'

export default {
  name: 'questions-randoms-Tab-liqiushi',
  components: { QuestionsRandomsListLiqiushi },
  props: {
    randomsList: {
      type: Array,
      require: true
    }
  },
  data () {
    return {
      activeName: 'liqiushi'
    }
  },
  computed: {},
  watch: {},
  created () {
  },
  mounted () {
  },
  methods: {
    handleTabClick (tab) {
      if (tab.name === 'liqiushi') {
        tab.name = ''
      }
      // 一行代码解决整个Tab栏切换---liqiushi
      this.$store.dispatch('questionsRandoms/getAsyncRandomsListParams', { chkState: tab.name })
    }
  }
}
</script>
